Fix cut-and-paste error in GtkEntryAccessible/GtkLabelAccessible
authorDan Winship <danw@gnome.org>
Wed, 10 Aug 2011 19:19:56 +0000 (15:19 -0400)
committerDan Winship <danw@gnome.org>
Wed, 10 Aug 2011 19:19:56 +0000 (15:19 -0400)
The y position of the character depends on the window's y coordinate,
not its x coordinate.

gtk/a11y/gtkentryaccessible.c
gtk/a11y/gtklabelaccessible.c

index 6c4180a3f6168335d8593446fa721258ca6fb616..e0ff6dfc09b6f1c8c2e0c75e5bc13b139f8249c5 100644 (file)
@@ -442,7 +442,7 @@ gtk_entry_accessible_get_character_extents (AtkText      *text,
   gdk_window_get_origin (window, &x_window, &y_window);
 
   *x = x_window + x_layout + char_rect.x;
-  *y = x_window + y_layout + char_rect.y;
+  *y = y_window + y_layout + char_rect.y;
   *width = char_rect.width;
   *height = char_rect.height;
 
index b794385e7dcc23fb04309329b27f0b1c4738c0bc..fd291d787d4253006f84a4de6f6c562ab67493f9 100644 (file)
@@ -574,7 +574,7 @@ gtk_label_accessible_get_character_extents (AtkText      *text,
   gdk_window_get_origin (window, &x_window, &y_window);
 
   *x = x_window + x_layout + char_rect.x;
-  *y = x_window + y_layout + char_rect.y;
+  *y = y_window + y_layout + char_rect.y;
   *width = char_rect.width;
   *height = char_rect.height;